<?php

abstract class AbstractDecoratorFactory implements Factory
{
    /**
     * @var Factory
     */
    private $_Factory;
    
    public function __construct(Factory $Factory)
    {
        $this->_Factory = $Factory;
    }
    
    public function __toString()
    {
        return sprintf("%s(%s)", get_class($this), $this->_Factory);
    }
    
    public function getFactory()
    {
    	return $this->_Factory;
    }
    
    public function create(array $data)
    {
        return $this->getFactory()->create($data);
    }
}
